export default {
  path: '/insur',
  component: () => import(/* webpackChunkName: "credit-insur" */ '@/credit/views/insur/Layout.vue'),
  meta: {
    root: true,
    title: '农业大数据信用服务平台',
    // job: ['org_corp'],
    org: ['org_insurance'],
  },
  children: [
    {
      path: '',
      redirect: 'insur',
    },
    {
      path: 'insur',
      component: { render: h => h('router-view') },
      meta: { icon: 'fa fa-map-marker', hidden: true },
      children: [
        {
          path: '',
          redirect: 'index',
        },
        {
          path: 'index',
          component: () =>
            import(/* webpackChunkName: "credit-insur" */ '@/components/AliveViewAnimate.vue'),
          meta: { title: '涉农保险', icon: 'fa fa-archive' },
          children: [
            {
              path: '',
              redirect: 'warranty',
            },
            {
              path: 'warranty',
              component: () =>
                import(/* webpackChunkName: "credit-insur" */ '@/credit/views/insur/Warranty.vue'),
              meta: { title: '保单管理', keepAlive: true },
            },
            {
              path: 'type',
              component: () =>
                import(/* webpackChunkName: "credit-insur" */ '@/credit/views/insur/Type.vue'),
              meta: { title: '险种管理', keepAlive: true },
            },
          ],
        },
        {
          path: 'customer',
          component: () =>
            import(/* webpackChunkName: "credit-insur" */ '@/components/AliveViewAnimate.vue'),
          meta: { title: '客户管理', icon: 'fa fa-users' },
          children: [
            {
              path: '',
              redirect: 'new',
            },
            {
              path: 'new',
              component: () =>
                import(
                  /* webpackChunkName: "credit-insur" */ '@/credit/views/insur/CustomerNew.vue'
                ),
              meta: { title: '新增客户', keepAlive: true },
            },
            {
              path: 'in',
              component: () =>
                import(
                  /* webpackChunkName: "credit-insur" */ '@/credit/views/insur/CustomerIn.vue'
                ),
              meta: { title: '在保客户', keepAlive: true },
            },
            {
              path: 'out',
              component: () =>
                import(
                  /* webpackChunkName: "credit-insur" */ '@/credit/views/insur/CustomerOut.vue'
                ),
              meta: { title: '未保客户', keepAlive: true },
            },
          ],
        },
      ],
    },
  ],
}
